From 3e30d69082063c1e5069d2823f49919361d212f6 Mon Sep 17 00:00:00 2001 From: robertl Date: Thu, 13 Aug 2009 04:17:07 +0000 Subject: [PATCH] Enhancements to Garmin GPI. --- garmin_gpi.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/garmin_gpi.c b/garmin_gpi.c index 739b0c94e..e01f5598d 100644 --- a/garmin_gpi.c +++ b/garmin_gpi.c @@ -438,7 +438,12 @@ read_poi_group(const int sz, const int tag) #endif } - +// TODO: 'tag' is probably not a 32 bit value. +// most likely it's a pair of 16's: the first pair is the tag number. +// if the second 16 is "eight", then it's an +// extended thingy and it has a 4-byte extended record length (total number +// of bytes for all record fields and all nested records, starting after the +// length field) /* gpi tag handler */ static int read_tag(const char *caller, const int tag, waypoint *wpt) @@ -562,9 +567,13 @@ read_tag(const char *caller, const int tag, waypoint *wpt) gmsd = gpi_gmsd_init(wpt); GMSD_SET(phone_nr, str); } - if ((mask & 2) && (str = gpi_read_string("Unknown 1"))) { + if ((mask & 2) && (str = gpi_read_string("Phone2"))) { + gmsd = gpi_gmsd_init(wpt); + GMSD_SET(phone_nr2, str); } - if ((mask & 4) && (str = gpi_read_string("Unknown 2"))) { + if ((mask & 4) && (str = gpi_read_string("Fax"))) { + gmsd = gpi_gmsd_init(wpt); + GMSD_SET(fax_nr, str); } if ((mask & 8) && (str = gpi_read_string("Email"))) { gmsd = gpi_gmsd_init(wpt); -- 2.30.2